public abstract class Animal implements Loadable, LoadIntoCompartment {
	private String name;

	public Animal(String name) {
		this.setName(name);
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	@Override
	public boolean loadByTrailer(Trailer trailer) {
		return trailer.getCompartment().load(this);
	}

	@Override
	public boolean loadByTransporter(Transporter transporter) {
		return transporter.getCompartment().load(this);
	}
	
	@Override
	public String toString() {
		return this.name;
	}
}